package com.crm.dao.mapper.customMapper.csd;

import com.crm.model.entity.csd.customerManager.CustomerInfo;
import com.crm.model.entity.customerManager.Customer;
import com.crm.model.qo.csd.customerManager.CustomerInfoQO;
import com.crm.model.qo.csd.customerManager.CustomerQO;
import com.crm.model.vo.csd.customerManager.CustomerDetailVO;
import com.crm.model.vo.csd.customerManager.CustomerInfoVO;
import com.crm.model.vo.csd.customerManager.CustomerVO;
import com.crm.model.vo.csd.customerManager.ImportCustomerInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yincuimei
 * @Date 2021/7/22 16:45
 * (客服部)客户管理
 */
public interface CustomerListMapper {



    /**
     * 客户列表
     * @param customerQO ---搜索条件
     * @param sortOrder  ---排序
     * @author yincuimei
     * @return
     */
    List<CustomerVO> selectCustomerList(@Param("customerQO") CustomerQO customerQO, @Param("sortOrder") String sortOrder);

    /**
     * 会员客户列表
     * @param customerQO ---搜索条件
     * @param sortOrder  ---排序
     * @author wangpeng
     * @return
     */
    List<CustomerVO> selectCustomerMemberList(@Param("customerQO") CustomerQO customerQO, @Param("sortOrder") String sortOrder);

    /**
     * 非会员客户列表
     * @param customerQO ---搜索条件
     * @param sortOrder  ---排序
     * @author wangpeng
     * @return
     */
    List<CustomerVO> selectCustomerNonMemberList(@Param("customerQO") CustomerQO customerQO, @Param("sortOrder") String sortOrder);


    /**
     * 客户详情(企业客户)
     * @param customerId  ---客户ID
     * @return
     */
    CustomerDetailVO selectCustomerDetailVO(@Param("customerId") String customerId);

    int updateRetrieveCustomer(Customer customer);

    /**
     * 客户列表--操作解锁
     * @param customerId --客户ID
     * @author wangpeng
     * @return
     */
    Boolean updateCustomerMembershipLevelUnlock(@Param("customerId") String customerId);
    /**
     * 客户列表--操作锁定
     * @param customerId --客户ID
     * @author wangpeng
     * @return
     */
    Boolean updateCustomerMembershipLevelLocking(@Param("customerId") String customerId);

    /**
     * @Author renshaorong
     * @Date 2021/11/26
     */
    List<CustomerInfoVO> selectCustomerInfoList(@Param("qo") CustomerInfoQO qo, @Param("order") String order);

    /**
     * 批量插入CustomerInfo
     * @Author renshaorong
     * @Date 2021/11/26
     * @param list	
     * @return
     */
    void addCustomerInfo(@Param("list") List<CustomerInfo> list);

    /**
     * @Author renshaorong
     * @Date 2021/11/26
     */
    List<ImportCustomerInfoVO> exportExcel();

    List<CustomerInfoVO> selectProviceList();

    List<CustomerInfoVO> selectCityByProvice(@Param("provice")String provice);

    List<CustomerInfoVO> selectDistrictByProviceCity(@Param("provice")String provice,@Param("city")String city);

    List<CustomerInfoVO> selectIndustryTypeList();

    /**
     * 获取详情
     * @param customerInfoId
     * @return
     */
    CustomerInfo getCustomerInfoDetailByCustomerInfoId(@Param("customerInfoId") String customerInfoId);
}
